package com.ms.education.course.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.ms.education.course.entity.ClassTeacher;
import com.ms.education.course.mapper.ClassTeacherMapper;
import com.ms.education.course.service.ClassTeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ms
 * @since 2023-02-24
 */
@Service
public class ClassTeacherServiceImp extends ServiceImpl<ClassTeacherMapper, ClassTeacher> implements ClassTeacherService {


    @Override
    public void deleteClassTeacher(Integer classId, Integer teacherId) {
        UpdateWrapper<ClassTeacher> wrapper = new UpdateWrapper<ClassTeacher>().eq("class_id", classId)
                .eq("teacher_id", teacherId);
        remove(wrapper);
    }
}
